package com.jiyun.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 订单表，记录用户的订单信息
 * </p>
 *
 * @author author
 * @since 2024-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dc_order")
@ApiModel(value = "DcOrder对象", description = "订单表，记录用户的订单信息")
public class DcOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID，自动递增")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "订单类型（实时/预约单）")
    private String orderType;

    @ApiModelProperty(value = "接单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date pickUpTime;

    @ApiModelProperty(value = "预计结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expectedEndTime;

    @ApiModelProperty(value = "实际结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date actualEndTime;

    @ApiModelProperty(value = "当前地址")
    private String currentAddress;

    @ApiModelProperty(value = "目的地")
    private String destination;

    @ApiModelProperty(value = "订单价格")
    private Long orderPrice;

    @ApiModelProperty(value = "用户外键")
    private Integer userId;

    @ApiModelProperty(value = "司机外键")
    private Integer driverId;

    @ApiModelProperty(value = "是否上车")
    private Boolean isOnBoard;

    @ApiModelProperty(value = "乘车码")
    private String boardingCode;
    @ApiModelProperty(value = "订单表状态")
    private Integer status;

    @TableField(exist = false)
    private String uname;

    @TableField(exist = false)
    private String dname;

    @TableField(exist = false)
    @ApiModelProperty(value = "接单数")
    private Integer num;

    @TableField(exist = false)
    @ApiModelProperty(value = "今日流水")
    private BigDecimal money;
}
